<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@	page import="kau.dao.*"%>
<%@	page import="kau.vo.*"%>
<%@ page import="java.util.ArrayList"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>수강신청 내역조회</title>
<script type="text/javascript">
	function cancelenroll() {
		alert('취소되었습니다');
		//alert(courseId);
		//alert(custId);
		var theForm = document.f;
		//theForm.method = "post";
		//theForm.action = "delete.registeration?courseId=" + courseId
		//		+ "&custId=" + custId;

	return true;
		//location.replace("delete.registeration?courseId=" + courseId + "&custId=" + custId);
	}
</script>

<style type="text/css">
<!--
@import url("css/style.css");
-->
</style>
<style type="text/css">
#info {
	font-family: 맑은 고딕, dotum, sans-serif, bold;
	font-size: 13px
}
</style>

</head>
<body>

		<div id="info">

			<br>
			<table align="left" style="margin-left: 20px">
				<tr>

				<td width="60" height="50">
					<img src="/nems/cust/img/enroll_search.png" width="40" alt="수강신청 내역 조회" /> 
					</td>
					
					<td>
					<h4	style=" font-weight: bold; color: #005700; text-align: left; font-size: 20px;">수강신청 내역조회</h4>
					</td>
				</tr>
			</table>
			
			<br><br><br><br>
			
		</div>
	<form action="delete.registeration" method="post" name="f" onsubmit="return cancelenroll()">
		
		<table id="newspaper-a" summary="2007 Major IT Companies' Profit" style="width: 750px">
			<thead>


				<tr align="center">
					<th scope="col" width="3%">No.</th>
					<th scope="col" width="27%">강의</th>
					<th scope="col" width="16%">강사명</th>
					<th scope="col" width="17%">시작날짜</th>
					<th scope="col" width="17%">종료날짜</th>
					<th scope="col" width="5%">시작시간</th>
					<th scope="col" width="5%">종료시간</th>
					<th scope="col" width="5%">수강신청</th>
				</tr>

			</thead>

			<input type="hidden" name="custId" value="${custId}"/>
			
			<c:set value="${requestScope.registerList}" var="registerList"></c:set>
			<c:set value="${requestScope.custId}" var="custId"></c:set>
			<c:forEach items="${requestScope.courseList}" var="courseList"
				varStatus="status">
				<tbody>
					<tr align="center">
						<td>${status.index+1}</td>
						<td>${courseList.courseName}</td>
						<td>${courseList.lecturer}</td>
						<td>${courseList.startDate}</td>
						<td>${courseList.endDate}</td>
						<td>${courseList.startTime}</td>
						<td>${courseList.endTime}</td>
						<input type="hidden" name="courseId" value="${courseList.courseId}"/>
						<td width="5px"><c:if
								test="${registerList[status.index].isConfirm=='0'}">

								<button class="negative" style="width: 70px" type="submit"
									>
									<img src="cust/img/delete.png"
										style="width: 20px; height: 10px" />취소
								</button>

							</c:if> <c:if test="${registerList[status.index].isConfirm=='1'}">
								<button style="width: 70px" disabled>
									<img src="/nems/cust/img/tick.png"
										style="width: 20px; height: 10px" />승인
								</button>

							</c:if></td>

					</tr>
				</tbody>
			</c:forEach>
		</table>
	</form>
	<br>
	<center>
		<a href="javascript:history.go(-1)" class="css_btn_class">이전화면으로</a>
	</center>

</body>
</html>